package com.huawei.appgallery.assistantdock.gamemode.card;

import android.content.Context;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.azc;
import o.beo$d;
import o.beo.f;
import o.bif.d;
import o.bif.h;
import o.bii;
import o.biu;
import o.biw;
import o.ContentManager;
import o.fam;

public class KeyControlEnterCardBuoy extends BuoyBaseEnterCard {
    public KeyControlEnterCardBuoy(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        this.ˊ.setText(f.ˊˋ);
        this.ॱ = bii.ᐝ() == h.OPEN;
        ॱॱ();
    }

    public void ˋ() {
        this.ॱ = !this.ॱ;
        ॱॱ();
        bii.ˋ(this.ॱ ? h.OPEN : h.CLOSE);
        if (biu.ˋ().ʼ() && this.ॱ) {
            Context ॱ = azc.ॱ(ContentManager.getInstant().getContext());
            fam.ॱ().ॱ(ॱ, new biw(ॱ));
            biu.ˋ().ॱॱ();
        }
        ʻ();
        ˏ(this.ॱ ? "STATE2" : "STATE1");
    }

    void ॱॱ() {
        this.ʼ.setBackgroundResource(this.ॱ ? beo$d.ˋˋ : beo$d.ˋᐝ);
    }

    String ᐝ() {
        return d.GSS_KEY_CONTROL_MODE.ˊ();
    }
}
